import os
import cv2
import numpy as np

def inference(obj):
    '''
    预测图像的行列分割二值图
    :param obj: bytes二进制格式
    :return: 行列分割二值图
    '''
    image = cv2.imdecode(np.array(bytearray(obj), dtype='uint8'), cv2.IMREAD_UNCHANGED)
    cv2.namedWindow('temp', cv2.WINDOW_NORMAL)
    cv2.imshow('temp', image)
    cv2.waitKey()
    cv2.destroyAllWindows()
